package com.hang.controller;

import com.hang.esService.SubjectEsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
public class SubjectEsController {

    @Resource
    private SubjectEsService subjectEsService;

    @GetMapping("/createIndex")
    private void createIndex(){
        subjectEsService.createIndex();
    }

    @GetMapping("/addDoc")
    private void addDoc(){
        subjectEsService.getDocs();
    }

    @GetMapping("/findDoc")
    private void findDoc(){
        subjectEsService.find();
    }

    @GetMapping("/search")
    private void search(){
        subjectEsService.search();
    }
}
